10.5 Web Interface
The data that Quevedo aims to manage are highly visual, and therefore a visual interface can be very useful. Indeed, in the case of annotation, being able to see the target of annotation is fundamental. It is also a task which may be shared between a team, or conducted by people who are not data scientists or engineers and don’t feel comfortable with code and a command line interface.
Quevedo provides a web interface which can be used to visualize, manage and annotate data in a Quevedo dataset. The web interface has the advantage that is graphical, and it can also be run on a server or some shared computer accesible via the internet so that collaborators can work on the dataset without any infrastructure needs on their part (beyond a modern browser).
To use the web interface locally, just run
quevedo web
. This will launch the server in a local port
and open a browser window at the appropriate location. To quit the
server, just press Ctrl+C
in the terminal window. For
more options see the rest of this document, and for usage of the web
interface see Section
10.7.
10.5.1 Configuration
Some options for the web interface can be configured in the dataset configuration file (Section 10.4). Since some of these settings may be sensitive, they can be set in the local configuration file if the dataset is going to be distributed publicly.
The main configuration is set under the heading web
,
and the following options can be set:
10.5.2 Server options
host
,port
: IP address and port to bind the server to.mount_path
: path under which the application will be mounted.secret_key
: secret string to sign session cookies. You can generate a random one for your installation withpython -c 'from secrets import token_hex; print(token_hex(16))'
.
10.5.3 Interface options
lang
: the language for messages in the web interface. Supported values for now areen
(english) ores
(spanish).colors
: a custom list of colors (in hex notation) can be given for the logogram annotation interface to use. For example:colors = ['#ff0000', '#00ff00', '#0000ff']
.public
: If true, no login will be required. If false, access will only be provided to logged in users.
10.5.4 Users
To create a user (needed if the dataset interface is not set to
public
) add a heading [web.users.<user_name>]
,
with the following options:
password
: hex digest of the sha1 hash of the password for the user. You can generate the hash with the following code:import hashlib = hashlib.new("sha1", "thepassword".encode("utf8")) hashed print(hashed.hexdigest())
read
: subsets that the user has read access to. Can beALL
,NONE
, or a list of subsets to allow access to. These strings are actually regexes1, so any subset matching them will be available.write
: subsets that the user has write access to. Follows the same syntax ofread
. Write access means adding annotations to a subset, and saving modified annotations to the server (the annotation can be changed locally, but not saved).
Assuming we have the sets spanish_a
,
spanish_b
and english_a
:
read = [ "spanish", "english" ]
will allow access to all sets.read = [ "spanish_a" ]
will only allow access to thespanish_a
set.read = [ "_a" ]
will allow access to thespanish_a
andenglish_a
sets.
You can use ^
, $
, and other
regex syntax to be more specific.